package com.example.juc.kkb.deadlock;

public class DeadLockDemo {
    public static void main(String[] args) {
        // 竞争资源
        String lockA = "lockA";
        String lockB = "lockB";
        new Thread(new HoldLockThread(lockA, lockB), "ThreadA").start();
        new Thread(new HoldLockThread(lockB, lockA), "ThreadB").start();
    }
}